package com.jiazhong.dao;

import com.jiazhong.pojo.Student;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
import java.util.List;

//@Repository
public interface StudentMapper {
    @Select("select * from student")
    List<Student> selectAllDao();

    @Insert("insert into student values(null,#{name},#{sex},#{age})")
    Integer insertDao(Student student);

    @Delete("delete from student where id=#{id}")
    Integer deleteDao(Integer id);

    @Select("select * from student where id=#{id}")
    Student getOneDao(Integer id);

    @Update("update student set name=#{name},sex=#{sex},age=#{age} where id=#{id}")
    Integer updateDao(Student student);
}
